package com.zjj.springboot.jdbcTemplate.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zjj.springboot.jdbcTemplate.bean.User;
import com.zjj.springboot.jdbcTemplate.dao.UserDao;
import com.zjj.springboot.jdbcTemplate.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserDao userDao;
	
	@Override
	public List<User> queryUserList() {
		return userDao.queryUserList();
	}

	@Override
	public User queryUserById(int id) {
		return userDao.queryUserById(id);
	}

	@Override
	public boolean addUser(User user) {
		return userDao.addUser(user);
	}

	@Override
	public boolean updateUser(User user) {
		return userDao.updateUser(user);
	}

	@Override
	public boolean deleteUser(int id) {
		return userDao.deleteUser(id);
	}

}
